3.195 \(\int \csc (c+b x) \sin (a+b x) \, dx\)

Optimal. Leaf size=26 \[ \frac {\sin (a-c) \log (\sin (b x+c))}{b}+x \cos (a-c) \]

[Out]

x*cos(a-c)+ln(sin(b*x+c))*sin(a-c)/b

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {4582, 3475, 8} \[ \frac {\sin (a-c) \log (\sin (b x+c))}{b}+x \cos (a-c) \]

Antiderivative was successfully verified.

[In]

Int[Csc[c + b*x]*Sin[a + b*x],x]

[Out]

x*Cos[a - c] + (Log[Sin[c + b*x]]*Sin[a - c])/b

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4582

Int[Csc[w_]^(n_.)*Sin[v_], x_Symbol] :> Dist[Sin[v - w], Int[Cot[w]*Csc[w]^(n - 1), x], x] + Dist[Cos[v - w],
Int[Csc[w]^(n - 1), x], x] /; GtQ[n, 0] && FreeQ[v - w, x] && NeQ[w, v]

Rubi steps

\begin {align*} \int \csc (c+b x) \sin (a+b x) \, dx &=\cos (a-c) \int 1 \, dx+\sin (a-c) \int \cot (c+b x) \, dx\\ &=x \cos (a-c)+\frac {\log (\sin (c+b x)) \sin (a-c)}{b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.15, size = 26, normalized size = 1.00 \[ \frac {\sin (a-c) \log (\sin (b x+c))}{b}+x \cos (a-c) \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + b*x]*Sin[a + b*x],x]

[Out]

x*Cos[a - c] + (Log[Sin[c + b*x]]*Sin[a - c])/b

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 31, normalized size = 1.19 \[ \frac {b x \cos \left (-a + c\right ) - \log \left (\frac {1}{2} \, \sin \left (b x + c\right )\right ) \sin \left (-a + c\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(b*x+c)*sin(b*x+a),x, algorithm="fricas")

[Out]

(b*x*cos(-a + c) - log(1/2*sin(b*x + c))*sin(-a + c))/b

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(b*x+c)*sin(b*x+a),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (4*pi/x/2)>(-4*pi/
x/2)2/b*((tan(a/2)^2*tan(c/2)-tan(a/2)*tan(c/2)^2+tan(a/2)-tan(c/2))/(tan(a/2)^2*tan(c/2)^2+tan(a/2)^2+tan(c/2
)^2+1)*ln(abs(tan((b*x+c)/2)))+(-tan(a/2)^2*tan(c/2)+tan(a/2)*tan(c/2)^2-tan(a/2)+tan(c/2))/(tan(a/2)^2*tan(c/
2)^2+tan(a/2)^2+tan(c/2)^2+1)*ln(tan((b*x+c)/2)^2+1)+(2*tan(a/2)^2*tan(c/2)^2-2*tan(a/2)^2+8*tan(a/2)*tan(c/2)
-2*tan(c/2)^2+2)*1/2/(tan(a/2)^2*tan(c/2)^2+tan(a/2)^2+tan(c/2)^2+1)*(b*x+c)/2)

________________________________________________________________________________________

maple [B]  time = 1.55, size = 325, normalized size = 12.50 \[ -\frac {\ln \left (\tan \left (b x +a \right ) \cos \relax (a ) \cos \relax (c )+\tan \left (b x +a \right ) \sin \relax (a ) \sin \relax (c )+\cos \relax (a ) \sin \relax (c )-\sin \relax (a ) \cos \relax (c )\right ) \cos \relax (a ) \sin \relax (c )}{b \left (\left (\cos ^{2}\relax (a )\right ) \left (\cos ^{2}\relax (c )\right )+\left (\cos ^{2}\relax (a )\right ) \left (\sin ^{2}\relax (c )\right )+\left (\cos ^{2}\relax (c )\right ) \left (\sin ^{2}\relax (a )\right )+\left (\sin ^{2}\relax (a )\right ) \left (\sin ^{2}\relax (c )\right )\right )}+\frac {\ln \left (\tan \left (b x +a \right ) \cos \relax (a ) \cos \relax (c )+\tan \left (b x +a \right ) \sin \relax (a ) \sin \relax (c )+\cos \relax (a ) \sin \relax (c )-\sin \relax (a ) \cos \relax (c )\right ) \sin \relax (a ) \cos \relax (c )}{b \left (\left (\cos ^{2}\relax (a )\right ) \left (\cos ^{2}\relax (c )\right )+\left (\cos ^{2}\relax (a )\right ) \left (\sin ^{2}\relax (c )\right )+\left (\cos ^{2}\relax (c )\right ) \left (\sin ^{2}\relax (a )\right )+\left (\sin ^{2}\relax (a )\right ) \left (\sin ^{2}\relax (c )\right )\right )}+\frac {\ln \left (1+\tan ^{2}\left (b x +a \right )\right ) \cos \relax (a ) \sin \relax (c )}{2 b \left (\cos ^{2}\relax (c )+\sin ^{2}\relax (c )\right ) \left (\cos ^{2}\relax (a )+\sin ^{2}\relax (a )\right )}-\frac {\ln \left (1+\tan ^{2}\left (b x +a \right )\right ) \sin \relax (a ) \cos \relax (c )}{2 b \left (\cos ^{2}\relax (c )+\sin ^{2}\relax (c )\right ) \left (\cos ^{2}\relax (a )+\sin ^{2}\relax (a )\right )}+\frac {\arctan \left (\tan \left (b x +a \right )\right ) \cos \relax (a ) \cos \relax (c )}{b \left (\cos ^{2}\relax (c )+\sin ^{2}\relax (c )\right ) \left (\cos ^{2}\relax (a )+\sin ^{2}\relax (a )\right )}+\frac {\arctan \left (\tan \left (b x +a \right )\right ) \sin \relax (a ) \sin \relax (c )}{b \left (\cos ^{2}\relax (c )+\sin ^{2}\relax (c )\right ) \left (\cos ^{2}\relax (a )+\sin ^{2}\relax (a )\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(b*x+c)*sin(b*x+a),x)

[Out]

-1/b/(cos(a)^2*cos(c)^2+cos(a)^2*sin(c)^2+cos(c)^2*sin(a)^2+sin(a)^2*sin(c)^2)*ln(tan(b*x+a)*cos(a)*cos(c)+tan
(b*x+a)*sin(a)*sin(c)+cos(a)*sin(c)-sin(a)*cos(c))*cos(a)*sin(c)+1/b/(cos(a)^2*cos(c)^2+cos(a)^2*sin(c)^2+cos(
c)^2*sin(a)^2+sin(a)^2*sin(c)^2)*ln(tan(b*x+a)*cos(a)*cos(c)+tan(b*x+a)*sin(a)*sin(c)+cos(a)*sin(c)-sin(a)*cos
(c))*sin(a)*cos(c)+1/2/b/(cos(c)^2+sin(c)^2)/(cos(a)^2+sin(a)^2)*ln(1+tan(b*x+a)^2)*cos(a)*sin(c)-1/2/b/(cos(c
)^2+sin(c)^2)/(cos(a)^2+sin(a)^2)*ln(1+tan(b*x+a)^2)*sin(a)*cos(c)+1/b/(cos(c)^2+sin(c)^2)/(cos(a)^2+sin(a)^2)
*arctan(tan(b*x+a))*cos(a)*cos(c)+1/b/(cos(c)^2+sin(c)^2)/(cos(a)^2+sin(a)^2)*arctan(tan(b*x+a))*sin(a)*sin(c)

________________________________________________________________________________________

maxima [B]  time = 0.40, size = 108, normalized size = 4.15 \[ \frac {2 \, b x \cos \left (-a + c\right ) - \log \left (\cos \left (b x\right )^{2} + 2 \, \cos \left (b x\right ) \cos \relax (c) + \cos \relax (c)^{2} + \sin \left (b x\right )^{2} - 2 \, \sin \left (b x\right ) \sin \relax (c) + \sin \relax (c)^{2}\right ) \sin \left (-a + c\right ) - \log \left (\cos \left (b x\right )^{2} - 2 \, \cos \left (b x\right ) \cos \relax (c) + \cos \relax (c)^{2} + \sin \left (b x\right )^{2} + 2 \, \sin \left (b x\right ) \sin \relax (c) + \sin \relax (c)^{2}\right ) \sin \left (-a + c\right )}{2 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(b*x+c)*sin(b*x+a),x, algorithm="maxima")

[Out]

1/2*(2*b*x*cos(-a + c) - log(cos(b*x)^2 + 2*cos(b*x)*cos(c) + cos(c)^2 + sin(b*x)^2 - 2*sin(b*x)*sin(c) + sin(
c)^2)*sin(-a + c) - log(cos(b*x)^2 - 2*cos(b*x)*cos(c) + cos(c)^2 + sin(b*x)^2 + 2*sin(b*x)*sin(c) + sin(c)^2)
*sin(-a + c))/b

________________________________________________________________________________________

mupad [B]  time = 0.87, size = 111, normalized size = 4.27 \[ x\,\left (\frac {{\mathrm {e}}^{-a\,1{}\mathrm {i}+c\,1{}\mathrm {i}}}{2}-\frac {{\mathrm {e}}^{a\,1{}\mathrm {i}-c\,1{}\mathrm {i}}}{2}\right )+x\,\left (\frac {{\mathrm {e}}^{-a\,1{}\mathrm {i}+c\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{a\,1{}\mathrm {i}-c\,1{}\mathrm {i}}}{2}\right )+\frac {\ln \left (-{\mathrm {e}}^{a\,2{}\mathrm {i}-c\,2{}\mathrm {i}}+{\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}\right )\,\left (\frac {{\mathrm {e}}^{-a\,1{}\mathrm {i}+c\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}-\frac {{\mathrm {e}}^{a\,1{}\mathrm {i}-c\,1{}\mathrm {i}}\,1{}\mathrm {i}}{2}\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a + b*x)/sin(c + b*x),x)

[Out]

x*(exp(c*1i - a*1i)/2 - exp(a*1i - c*1i)/2) + x*(exp(c*1i - a*1i)/2 + exp(a*1i - c*1i)/2) + (log(exp(a*2i + b*
x*2i) - exp(a*2i - c*2i))*((exp(c*1i - a*1i)*1i)/2 - (exp(a*1i - c*1i)*1i)/2))/b

________________________________________________________________________________________

sympy [B]  time = 8.20, size = 333, normalized size = 12.81 \[ \left (\begin {cases} 0 & \text {for}\: b = 0 \wedge c = 0 \\x & \text {for}\: c = 0 \\0 & \text {for}\: b = 0 \\- \frac {b x \tan ^{2}{\left (\frac {c}{2} \right )}}{b \tan ^{2}{\left (\frac {c}{2} \right )} + b} + \frac {b x}{b \tan ^{2}{\left (\frac {c}{2} \right )} + b} - \frac {2 \log {\left (\tan {\left (\frac {c}{2} \right )} + \tan {\left (\frac {b x}{2} \right )} \right )} \tan {\left (\frac {c}{2} \right )}}{b \tan ^{2}{\left (\frac {c}{2} \right )} + b} - \frac {2 \log {\left (\tan {\left (\frac {b x}{2} \right )} - \frac {1}{\tan {\left (\frac {c}{2} \right )}} \right )} \tan {\left (\frac {c}{2} \right )}}{b \tan ^{2}{\left (\frac {c}{2} \right )} + b} + \frac {2 \log {\left (\tan ^{2}{\left (\frac {b x}{2} \right )} + 1 \right )} \tan {\left (\frac {c}{2} \right )}}{b \tan ^{2}{\left (\frac {c}{2} \right )} + b} & \text {otherwise} \end {cases}\right ) \cos {\relax (a )} + \left (\begin {cases} \tilde {\infty } x & \text {for}\: b = 0 \wedge c = 0 \\\frac {\log {\left (\sin {\left (b x \right )} \right )}}{b} & \text {for}\: c = 0 \\\frac {x}{\sin {\relax (c )}} & \text {for}\: b = 0 \\\frac {2 b x \tan {\left (\frac {c}{2} \right )}}{b \tan ^{2}{\left (\frac {c}{2} \right )} + b} - \frac {\log {\left (\tan {\left (\frac {c}{2} \right )} + \tan {\left (\frac {b x}{2} \right )} \right )} \tan ^{2}{\left (\frac {c}{2} \right )}}{b \tan ^{2}{\left (\frac {c}{2} \right )} + b} + \frac {\log {\left (\tan {\left (\frac {c}{2} \right )} + \tan {\left (\frac {b x}{2} \right )} \right )}}{b \tan ^{2}{\left (\frac {c}{2} \right )} + b} - \frac {\log {\left (\tan {\left (\frac {b x}{2} \right )} - \frac {1}{\tan {\left (\frac {c}{2} \right )}} \right )} \tan ^{2}{\left (\frac {c}{2} \right )}}{b \tan ^{2}{\left (\frac {c}{2} \right )} + b} + \frac {\log {\left (\tan {\left (\frac {b x}{2} \right )} - \frac {1}{\tan {\left (\frac {c}{2} \right )}} \right )}}{b \tan ^{2}{\left (\frac {c}{2} \right )} + b} + \frac {\log {\left (\tan ^{2}{\left (\frac {b x}{2} \right )} + 1 \right )} \tan ^{2}{\left (\frac {c}{2} \right )}}{b \tan ^{2}{\left (\frac {c}{2} \right )} + b} - \frac {\log {\left (\tan ^{2}{\left (\frac {b x}{2} \right )} + 1 \right )}}{b \tan ^{2}{\left (\frac {c}{2} \right )} + b} & \text {otherwise} \end {cases}\right ) \sin {\relax (a )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(b*x+c)*sin(b*x+a),x)

[Out]

Piecewise((0, Eq(b, 0) & Eq(c, 0)), (x, Eq(c, 0)), (0, Eq(b, 0)), (-b*x*tan(c/2)**2/(b*tan(c/2)**2 + b) + b*x/
(b*tan(c/2)**2 + b) - 2*log(tan(c/2) + tan(b*x/2))*tan(c/2)/(b*tan(c/2)**2 + b) - 2*log(tan(b*x/2) - 1/tan(c/2
))*tan(c/2)/(b*tan(c/2)**2 + b) + 2*log(tan(b*x/2)**2 + 1)*tan(c/2)/(b*tan(c/2)**2 + b), True))*cos(a) + Piece
wise((zoo*x, Eq(b, 0) & Eq(c, 0)), (log(sin(b*x))/b, Eq(c, 0)), (x/sin(c), Eq(b, 0)), (2*b*x*tan(c/2)/(b*tan(c
/2)**2 + b) - log(tan(c/2) + tan(b*x/2))*tan(c/2)**2/(b*tan(c/2)**2 + b) + log(tan(c/2) + tan(b*x/2))/(b*tan(c
/2)**2 + b) - log(tan(b*x/2) - 1/tan(c/2))*tan(c/2)**2/(b*tan(c/2)**2 + b) + log(tan(b*x/2) - 1/tan(c/2))/(b*t
an(c/2)**2 + b) + log(tan(b*x/2)**2 + 1)*tan(c/2)**2/(b*tan(c/2)**2 + b) - log(tan(b*x/2)**2 + 1)/(b*tan(c/2)*
*2 + b), True))*sin(a)

________________________________________________________________________________________